# 类继承联系：人力系统
# 注意super()的使用 这就是从父类调用属性方法的方式


class Employee:
    def __init__(self, name, id):
        self.name = name
        self.id = id

    def printInfo(self):
        print(f"Name: {self.name}, id: {self.id}")

class FullTimeEmployee(Employee):
    def __init__(self, name, id, monthly_salary):
        super().__init__(name, id)
        self.monthly_salary = monthly_salary

    def calculate_monthly_salary(self):
        super().printInfo()  
        print(f"Salary: {self.monthly_salary}")
    
class PartTimeEmployee(Employee):
    def __init__(self, name, id, daily_salary, work_days):
        super().__init__(name, id)
        self.daily_salary = daily_salary
        self.work_days = work_days

    def calculate_monthly_salary(self):
        super().printInfo()
        print(f"Salary: {self.daily_salary * self.work_days}")

# 创建全职员工对象
full_time_emp = FullTimeEmployee("张三", "FT001", 8000)
full_time_emp.calculate_monthly_salary()

print('')  # 添加空行以分隔输出

# 创建兼职员工对象
part_time_emp = PartTimeEmployee("李四", "PT001", 200, 20)
part_time_emp.calculate_monthly_salary()